import request from './request'

/**
 * Statistics related API
 */
export const statisticsAPI = {
  /**
   * Get dashboard data
   */
  getDashboard() {
    return request({
      url: '/statistics/dashboard',
      method: 'get'
    })
  },

  /**
   * Get monthly revenue
   */
  getMonthlyRevenue(params) {
    return request({
      url: '/statistics/revenue',
      method: 'get',
      params
    })
  },

  /**
   * Get blood type distribution
   */
  getBloodTypeDistribution() {
    return request({
      url: '/statistics/blood-type',
      method: 'get'
    })
  },

  /**
   * Get order trend
   */
  getOrderTrend(params) {
    return request({
      url: '/statistics/order-trend',
      method: 'get',
      params
    })
  }
}
